#ifndef PLANT2D_H
#define PLANT2D_H
#include "Signal.h"


/* --------------------------------------------------------------------------------
CLASS: plant2D
This is the basis class of 2D surface. Different model, e.g. KMC with different 
assumptions and EW equatioin based model should derived from PLANT2D.
   --------------------------------------------------------------------------------*/
class plant2D:public block{
  double XYmax;
  int LatticeSize;
  // Input
  double T;
  double W;
  // Outputs

  // Model Parameters
  // This part is model specified

  // Simulation parameters
  // This part is model specified
public:
  plant2D(double iXYmax, int L,double idt);
  ~plant2D();
  virtual void update(double sysTime);
  virtual void reset();
  void update(double sysTime,double T,double W);
  void output(string filename);
  double getM2();
  double getR2();
  double getCorLength();
};

void h2mode_2D(double *h,int L,double *z,int M);
void mode2h_2D(double *z,int M,double *h,int L);
double randn();
#endif
